<?php

/**
 *                    _ooOoo_
 *                   o8888888o
 *                   88" . "88
 *                   (| -_- |)
 *                    O\ = /O
 *                ____/`---'\____
 *              .   ' \\| |// `.
 *               / \\||| : |||// \
 *             / _||||| -:- |||||- \
 *               | | \\\ - /// | |
 *             | \_| ''\---/'' | |
 *              \ .-\__ `-` ___/-. /
 *           ___`. .' /--.--\ `. . __
 *        ."" '< `.___\_<|>_/___.' >'"".
 *       | | : `- \`.;`\ _ /`;.`/ - ` : | |
 *         \ \ `-. \_ __\ /__ _/ .-` / /
 * ======`-.____`-.___\_____/___.-`____.-'======
 *                    `=---='
 *
 * .............................................
 *          佛祖保佑             永无BUG
 */
namespace App\Channels;

use App\Repositories\WechatResposity;
use Illuminate\Notifications\Notification;

class WechatChannle extends  Notification
{
    public function send($notifiable, Notification $notification)
    {
        $message = $notification->toArray($notifiable);

        // 将通知发送给 $notifiable 实例
        $broadcast= new WechatResposity();
        $broadcast->sendOne($notifiable->openid,$message['message']);
    }

}